home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 6601 < prev    next >
Encoding:
Text File  |  1996-08-05  |  682 b   |  22 lines

  1. Newsgroups: comp.lang.c
  2. Path: leeds.ac.uk!news
  3. From: csyamc@scs.leeds.ac.uk (A M Casey)
  4. Subject: calloc help needed
  5. Message-ID: <1996Feb15.125431.7751@leeds.ac.uk>
  6. NNTP-Posting-Host: csgi37.leeds.ac.uk
  7. Organization: The University of Leeds, School of Computer Studies
  8. Date: Thu, 15 Feb 1996 12:54:31 +0000 (GMT)
  9.  
  10. I'm trying to allocate enough memory for an array of strings, defined as
  11. char * MyArray[20].
  12. the only manual entry I have for calloc says that it needs two values, the
  13. number of elements, and the size of each, but how do I actually use it?
  14.  
  15. MyArray = calloc(20,50);
  16.  
  17. doesnt work, as far as I can tell calloc returns an int.
  18.  
  19. ANy help would be greatly appreciated
  20.  
  21. ANdy
  22.